<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title></title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
    <!-- 准备好一个容器-->
    <div id="root">
        <h1>Hello,{{name}}</h1>
        <h1>学校名是:{{school.name}}</h1>
        <h1>学校地址:{{school.address}}</h1>
        <h1>我学的是:{{school.subject()}}</h1>
    </div>
    <!-- <script type="text/javascript" >
            Vue.config.productionTip = false
            
            new Vue({
                el:'#root',
                data:{
                    name:'1125班',
                    school:{
                        name:'atguigu',
                        address:'宏福科技园',
                        subject:function(){return '前端'}
                    }
                }
            })
        </script> -->
    <script type="text/javascript">
        Vue.config.productionTip = false

        new Vue({
            el: '#root',
            data: {
                name:'1125',
                school: {
                    name: 'atguigu',
                    address: '宏福科技园',
                    subject: function () { return '前端' }
                }
            }
        })
    </script>
</body>

</html>